package cn.dduan.fool.thread.pool.task;

import lombok.extern.slf4j.Slf4j;

/**
 * 实现 java.lang.Runnable 接口，实现run方法
 *
 * @author dduan
 * @version 1.0
 * @date 2023/3/18
 */
@Slf4j
public class MyRunnable implements Runnable {
    private int id;

    public MyRunnable(int id) {
        this.id = id;
    }

    @Override
    public void run() {
        Thread currentThread = Thread.currentThread();
        log.info("{}-执行任务：{}",  currentThread.getName(), id);
    }
}
